﻿// 商城

using UnityEngine;
using UnityEngine.UI;
using System;
using System.Collections.Generic;
using MotionFramework.UIKit;


namespace DemoProject
{
    public partial class MarketForms : UIWindow
    {
        //商城标题
        public Text TxtTitle;
        public Text TxtReturn;              

        protected override void OnInit()
        {
            //本窗体属性
            CurrentUIType.IsClearReverseChange = true;
            CurrentUIType.UIWindow_Type = UIWindowType.PopUp;
            CurrentUIType.UIWindow_ShowMode =UIWindowShowMode.ReverseChange;
            //CurrentUIType.UIWindow_LucencyType = UIWindowLucencyType.Impenetrable;

            //事件注册
            AddClickEventListener(m_Btn_Good1Button,
                () =>
                {
                    ShowUIWindow(UIWindowID.GoodsInfoForms.ToString());
                    //SendMessage(SysConst.MarketInfo, SysConst.MarketInfo_PropDetailInfo, ShowText("ClozeDetailInfo"));
                }
                );
            AddClickEventListener(m_Btn_Good3Button,
                () =>
                {
                    ShowUIWindow(UIWindowID.GoodsInfoForms.ToString());
                    //SendMessage(SysConst.MarketInfo, SysConst.MarketInfo_PropDetailInfo, ShowText("shoeDetailInfo"));
                }
            );
            AddClickEventListener(m_Btn_ReturnButton,
                () => CloseUIWindow<MarketForms>()
            );

        }//Awake_end

        void Start()
        {

        }//Start_end

        #region  窗体生命周期
        protected override void OnEnter()
        {
            if (m_Txt_TitleText)
            {
                m_Txt_TitleText.text = ShowText("MarketSys");
            }
            if (m_TxtReturnText)
            {
                m_TxtReturnText.text = ShowText("Return");
            }

            m_ContentViewMarketFormsContentView.SetContentText("热更新文字测试");
        }

        protected override void OnReEnter()
        {
            base.OnReEnter();
        }

        protected override void OnFreeze()
        {
            base.OnFreeze();
        }

        protected override void OnExit()
        {
            base.OnExit();
        }
        #endregion

    }//Class_end
}